import { lazy } from "react";
// import { WapHomeO, AppsO, FlowerO , CartO, UserO } from '@react-vant/icons';
import {
    AppOutline,
    MessageOutline,
    MessageFill,
    UnorderedListOutline,
    UserOutline,
  } from 'antd-mobile-icons'
export let mainRouter = [
    {
        path:"/index/home",
        element:lazy(()=>import("../page/index/Home")),
        icon:<AppOutline  />,
        title:"首页",
        content:false
    },
    {
        path:"/index/classify",
        element:lazy(()=>import("../page/index/Classify")),
        icon:<MessageFill  />,
        title:"分类",
        content:false
    },
    {
        path:"/index/eatFood",
        element:lazy(()=>import("../page/index/EatFood")),
        icon:<MessageOutline  />,
        title:"吃什么",
        content:false
    },
    {
        path:"/index/shopcar",
        element:lazy(()=>import("../page/index/ShopCar")),
        icon:<UserOutline  />,
        title:"购物车",
        content:true
    },
    {
        path:"/index/my",
        element:lazy(()=>import("../page/index/My")),
        icon:<UnorderedListOutline  />,
        title:"我的",
        content:false
        
    },
]

const routes = [
    {
        path:"/index",
        element:lazy(()=>import("../page/Index")),
        children:mainRouter
    },
    {
        path:"/login",
        element:lazy(()=>import("../page/Login"))
    },
    {
        path:"/details/:id",
        element:lazy(()=>import("../page/Details"))
    },
    {
        path:"*",
        element:lazy(()=>import("../page/Eorry404"))
    },
    {
        from:"/",
        to:"/index/home"
    }
]

export default routes